home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / bash_114.zip / bash-1.14.2 / builtins / reserved.def < prev    next >
Encoding:
Text File  |  1994-02-17  |  5.8 KB  |  143 lines

  1. This file is reserved.def, in which the shell reserved words are defined.
  2. It has no direct C file production, but defines builtins for the Bash
  3. builtin help command.
  4.  
  5. Copyright (C) 1987, 1989, 1991, 1992 Free Software Foundation, Inc.
  6.  
  7. This file is part of GNU Bash, the Bourne Again SHell.
  8.  
  9. Bash is free software; you can redistribute it and/or modify it under
  10. the terms of the GNU General Public License as published by the Free
  11. Software Foundation; either version 1, or (at your option) any later
  12. version.
  13.  
  14. Bash is distributed in the hope that it will be useful, but WITHOUT ANY
  15. WARRANTY; without even the implied warranty of MERCHANTABILITY or
  16. FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  17. for more details.
  18.  
  19. You should have received a copy of the GNU General Public License along
  20. with Bash; see the file COPYING.  If not, write to the Free Software
  21. Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  22.  
  23. $BUILTIN for
  24. $SHORT_DOC for NAME [in WORDS ... ;] do COMMANDS; done
  25. The `for' loop executes a sequence of commands for each member in a
  26. list of items.  If `in WORDS ...;' is not present, then `in "$@"' is
  27. assumed.  For each element in WORDS, NAME is set to that element, and
  28. the COMMANDS are executed.
  29. $END
  30.  
  31. $BUILTIN case
  32. $SHORT_DOC case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac
  33. Selectively execute COMMANDS based upon WORD matching PATTERN.  The
  34. `|' is used to separate multiple patterns.
  35. $END
  36.  
  37. $BUILTIN if
  38. $SHORT_DOC if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else COMMANDS; ] fi
  39. The if COMMANDS are executed.  If the exit status is zero, then the then
  40. COMMANDS are executed.  Otherwise, each of the elif COMMANDS are executed
  41. in turn, and if the exit status is zero, the corresponding then COMMANDS
  42. are executed and the if command completes.  Otherwise, the else COMMANDS
  43. are executed, if present.  The exit status is the exit status of the last
  44. command executed, or zero if no condition tested true.
  45. $END
  46.  
  47. $BUILTIN while
  48. $SHORT_DOC while COMMANDS; do COMMANDS; done
  49. Expand and execute COMMANDS as long as the final command in the
  50. `while' COMMANDS has an exit status of zero.
  51. $END
  52.  
  53. $BUILTIN until
  54. $SHORT_DOC until COMMANDS; do COMMANDS; done
  55. Expand and execute COMMANDS as long as the final command in the
  56. `until' COMMANDS has an exit status which is not zero.
  57. $END
  58.  
  59. $BUILTIN function
  60. $SHORT_DOC function NAME { COMMANDS ; } or NAME () { COMMANDS ; }
  61. Create a simple command invoked by NAME which runs COMMANDS.
  62. Arguments on the command line along with NAME are passed to the
  63. function as $0 .. $n.
  64. $END
  65.  
  66. $BUILTIN { ... }
  67. $DOCNAME grouping_braces
  68. $SHORT_DOC { COMMANDS }
  69. Run a set of commands in a group.  This is one way to redirect an
  70. entire set of commands.
  71. $END
  72.  
  73. $BUILTIN %
  74. $DOCNAME fg_percent
  75. $SHORT_DOC %[DIGITS | WORD] [&]
  76. This is similar to the `fg' command.  Resume a stopped or background
  77. job.  If you specifiy DIGITS, then that job is used.  If you specify
  78. WORD, then the job whose name begins with WORD is used.  Following the
  79. job specification with a `&' places the job in the background.
  80. $END
  81.  
  82. $BUILTIN Variables
  83. $DOCNAME variable_help
  84. $SHORT_DOC Some variable names and meanings
  85. BASH_VERSION    The version numbers of this Bash.
  86. CDPATH          A colon separated list of directories to search
  87.         when the argument to `cd' is not found in the current
  88.         directory.
  89. #if defined (HISTORY)
  90. HISTFILE        The name of the file where your command history is stored.
  91. HISTFILESIZE    The maximum number of lines this file can contain.
  92. HISTSIZE        The maximum number of history lines that a running
  93.         shell can access.
  94. #endif /* HISTORY */
  95. HOME            The complete pathname to your login directory.
  96. HOSTTYPE        The type of CPU this version of Bash is running under.
  97. IGNOREEOF       Controls the action of the shell on receipt of an EOF
  98.         character as the sole input.  If set, then the value
  99.         of it is the number of EOF characters that can be seen
  100.         in a row on an empty line before the shell will exit
  101.         (default 10).  When unset, EOF signifies the end of input.
  102. MAILCHECK    How often, in seconds, Bash checks for new mail.
  103. MAILPATH    A colon-separated list of filenames which Bash checks
  104.         for new mail.
  105. PATH            A colon-separated list of directories to search when
  106.         looking for commands.
  107. PROMPT_COMMAND  A command to be executed before the printing of each
  108.         primary prompt.
  109. PS1             The primary prompt string.
  110. PS2             The secondary prompt string.
  111. TERM            The name of the current terminal type.
  112. auto_resume     Non-null means a command word appearing on a line by
  113.         itself is first looked for in the list of currently
  114.         stopped jobs.  If found there, that job is foregrounded.
  115.         A value of `exact' means that the command word must
  116.         exactly match a command in the list of stopped jobs.  A
  117.         value of `substring' means that the command word must
  118.         match a substring of the job.  Any other value means that
  119.         the command must be a prefix of a stopped job.
  120. #if defined (HISTORY)
  121. command_oriented_history
  122.                 Non-null means to save multiple-line commands together on
  123.                 a single history line.
  124. #  if defined (BANG_HISTORY)
  125. histchars       Characters controlling history expansion and quick
  126.         substitution.  The first character is the history
  127.         substitution character, usually `!'.  The second is
  128.         the `quick substitution' character, usually `^'.  The
  129.         third is the `history comment' character, usually `#'.
  130. #  endif /* BANG_HISTORY */
  131. HISTCONTROL    Set to a value of `ignorespace', it means don't enter
  132.         lines which begin with a space or tab on the history
  133.         list.  Set to a value of `ignoredups', it means don't
  134.         enter lines which match the last entered line.  Set to
  135.         `ignoreboth' means to combine the two options.  Unset,
  136.         or set to any other value than those above means to save
  137.         all lines on the history list.
  138. #endif /* HISTORY */
  139. #if defined (JOB_CONTROL)
  140. notify          Notify of job termination immediately.
  141. #endif
  142. $END
  143.